package com.huiyeji.dynamic.core.bean;

import com.huiyeji.crypt.R2Coder;
import com.huiyeji.crypt.R3Coder;
import com.huiyeji.dynamic.core.annotations.DynamicBean;

import java.io.IOException;

@DynamicBean("R2Coder")
public class DynamicR2Coder {

    public String encode(String text){
        return R2Coder.instance_1.encode(text);
    }

    public String decode(String text){
        return R2Coder.instance_1.decode(text);
    }

    public void encodeFile(String filePath) throws IOException {
        R2Coder.instance_1.encodeFile(filePath);
    }

    public void decodeFile(String filePath) throws IOException {
        R2Coder.instance_1.decodeFile(filePath);
    }
}
